/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multiface.promonet.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author diego
 */
@Embeddable
public class ReferentePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "utente")
    private int utente;
    @Basic(optional = false)
    @Column(name = "referente")
    private int referente;

    public ReferentePK() {
    }

    public ReferentePK(int utente, int referente) {
        this.utente = utente;
        this.referente = referente;
    }

    public int getUtente() {
        return utente;
    }

    public void setUtente(int utente) {
        this.utente = utente;
    }

    public int getReferente() {
        return referente;
    }

    public void setReferente(int referente) {
        this.referente = referente;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) utente;
        hash += (int) referente;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ReferentePK)) {
            return false;
        }
        ReferentePK other = (ReferentePK) object;
        if (this.utente != other.utente) {
            return false;
        }
        if (this.referente != other.referente) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "multiface.promonet.jpa.ReferentePK[ utente=" + utente + ", referente=" + referente + " ]";
    }
    
}
